package libs;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Test {
	
	public void divide(){
		System.out.println("result 1 : " + (999/1000));
		System.out.println("result 2 : " + (-999/1000));
	}
	
	public void pattern1(){
		String pattern = "[a-zA-Z0-9]{3,20}@hongngochospital.com";
		String str1 = "trungnq@hongngochospital.com";
		String str2 = "toannn10@hongngochospital.com";
		System.out.println("Result = " + str1.matches(pattern));
		System.out.println("Result = " + str2.matches(pattern));
	}
	
	public void listTest(){
		Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();
		Map<String, String> subMap = new HashMap<String, String>();
		subMap.put("11", "1");
		map.put("1", subMap);
		subMap.put("12", "2");
		Set<String> strs = map.get("1").keySet();
		for (Iterator<String> iterator = strs.iterator(); iterator.hasNext();) {
			String string = (String) iterator.next();
			System.out.println("----------"+string);
		}
	}
	
	public static void main(String[] args) {
		Test test = new Test();
		/*test.pattern1();*/
		test.listTest();
	}
	
	
}
